package com.ws.mapper;

import com.ws.domain.Item;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ItemMapper {

    /**
     * 根据订单id 查询订单项
     * @param orderId
     * @return
     */
    @Select("select * from items where order_id = #{orderId}")
    List<Item> getItemsByOrderId(@Param("orderId")int orderId);
}
